package gcu.module.owner.dao.mapper;

import gcu.module.owner.daomain.Owner;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * Created by haol on 2016/9/23.
 */
@Repository
public interface OwnerMapper {

      /*增加用户*/
      void addOwner(@Param("owner") Owner owner);

      /*删除用户*/
      void deleteOwner(@Param("id") Integer id);

      /*删除用户*/
      void deleteOwnerByList(@Param("list") List list);

      /*更新用户*/
      void updateOwner(@Param("owner") Owner owner);

      /*更新用户*/
      void setMoneyInfo(@Param("ownerId") int id, @Param("IsMoney") int IsMoney);

      Owner queryOwnerById(@Param("id") Integer id);

      Owner queryOwnerByName(@Param("ownerName") String ownerName);

      Owner queryOwnerByBuildAndRoom(@Param("buildName") String buildName, @Param("roomNum") String roomNum);

      Owner queryOwnerByCreateTime(@Param("createTime") String createTime);

      List<Owner> query(@Param("owner") Owner owner, @Param("skip") int skip, @Param("size") int size);

      long count(@Param("owner") Owner owner);

      List<Owner> queryOwnerByBuild(@Param("buildName") String buildName);


}
